package com.lanou.pianke.admin.service.impl;

import com.lanou.pianke.admin.mapper.PieceMapper;
import com.lanou.pianke.admin.service.PieceService;
import com.lanou.pianke.piece.web.entity.Piece;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PieceServiceImpl implements PieceService {
    @Autowired
    private PieceMapper pieceMapper;

    @Override
    public List<Piece> showAll() {
        return pieceMapper.selectAll();
    }

    @Override
    public void deleteReported() {
        pieceMapper.updateStatus();
    }

    @Override
    public List<Piece> showReported() {
        return pieceMapper.selectReported();
    }

    @Override
    public void deleteByPieceid(String pieceid) {
        pieceMapper.updateStatusByPieceid(pieceid);
    }

    @Override
    public void deleteByUid(Long uid) {
        pieceMapper.updateStatusByUid(uid);
    }


}
